package com.example.mapstruct.converter;

import com.example.mapstruct.entity.FeMale;
import com.example.mapstruct.entity.Male;
import com.example.mapstruct.entity.People;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface BeanMapper {
    @Mapping(source = "email", target = "emailAddress")
    Male peopleToMale(People p);

    List<Male> peopleListToMale(List<People> p);

    @Mapping(source = "email", target = "emailAddress")
    FeMale peopleToFeMale(People p);
}
